#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin >> n;
    vector<long long> num(6);
    while (n--)
    {
        for (int i = 0; i < 6; i++)cin >> num[i];
        sort(num.begin(), num.end());
        if (num[0] + num[1] > num[2] && num[3] + num[4] > num[5])
        {
            cout << "Yes" << endl;
        }
        else if (num[0] + num[2] > num[3] && num[1] + num[4] > num[5])
        {
            cout << "Yes" << endl;
        }
        else if (num[0] + num[3] > num[4] && num[1] + num[2] > num[5])
        {
            cout << "Yes" << endl;
        }
        else if (num[0] + num[4] > num[5] && num[1] + num[2] > num[3])
        {
            cout << "Yes" << endl;
        }
        else cout << "No" << endl;
    }
    return 0;
}